<template>
  <div class="m-tab-panel" v-show="$parent.activeName_ === name">
    <slot></slot>
  </div>
</template>

<script>
export default {
  name: 'TabPane',
  props: {
    name: { // 定义面板的名称
      type: [String, Number],
      default: undefined,
      required: true
    },
    title: { // 定义面板的标题
      type: String,
      default: '',
      required: true
    }
  },
  // created() {
  //   console.log(this.name)
  //   // 获取父组件的activeName_
  //   console.log(this.$parent.activeName_)
  // }
}
</script>

<style>

</style>